Storage devices using semiconductor elements are broadly classified into two kinds of devices: a volatile device that loses stored data when power is not supplied, and a non-volatile device that holds stored data even when power is not supplied.
A typical example of a volatile storage device is a dynamic random access memory (DRAM). A DRAM stores data in such a manner that a transistor included in a storage element is selected and charge is stored in a capacitor.
When data is read from a DRAM, charge in a capacitor is lost according to the above-described principle; thus, another writing operation is necessary whenever data is read. Moreover, a transistor included in a storage element has a leakage current (off-state current) between a source and a drain in an off state or the like and charge flows into or out of a capacitor even if the transistor is not selected, whereby a data holding period is short. For that reason, another writing operation (refresh operation) is necessary at predetermined intervals, and it is difficult to sufficiently reduce power consumption. Furthermore, since stored data is lost when power is not supplied, an additional storage device using a magnetic material or an optical material is needed in order to hold data for a long time.
Another example of a volatile storage device is a static random access memory (SRAM). An SRAM holds stored data by using a circuit such as a flip-flop and thus does not need refresh operation. This means that an SRAM has an advantage over a DRAM. However, cost per storage capacity is increased because a circuit such as a flip-flop is used. Moreover, as in a DRAM, stored data in an SRAM is lost when power is not supplied.
A typical example of a non-volatile storage device is a flash memory. A flash memory includes a floating gate between a gate electrode and a channel formation region in a transistor and stores data by holding charge in the floating gate. Therefore, a flash memory has advantages in that a data holding period is extremely long (almost permanent) and refresh operation which is necessary in a volatile storage device is not needed (e.g., see Patent Document 1).
However, a gate insulating layer included in a storage element deteriorates by tunneling current generated in writing, so that the storage element stops its function after a certain number of writings. In order to reduce adverse effects of this problem, a method in which the number of writing operations for storage elements is equalized is employed, for example. However, a complicated peripheral circuit is needed to realize this method. Moreover, employing such a method does not solve the fundamental problem of lifetime. That is, a flash memory is not suitable for applications in which data is frequently rewritten.
In addition, a flash memory needs high voltage for holding charge in the floating gate or removing charge, and a circuit for generating high voltage. Further, it takes a relatively long time to hold or remove charge, and it is not easy to increase the speed of writing or erasing data.